import Http from "~/apis/utils/http";

class SystemDepartment extends Http {
  getAll() {
    return this.get("department/all");
  }

  filterData(params?: any) {
    return this.post("department/filter", params);
  }

  getTreeData(params?: any) {
    return this.get("department/page/tree", params);
  }

  deleteById(id: any) {
    return this.delete(`department/delete/${id}`);
  }

  deleteMany(ids: any) {
    return this.post("department/deleteMany", { ids: ids });
  }

  update(model: any) {
    return this.post("department/update", model);
  }

  create(model: any) {
    return this.post("department/create", model);
  }
}

export default new SystemDepartment();
